﻿//Created by Action Script Viewer - http://www.buraks.com/asv
package Classes.effects {
    import flash.display.*;
    import Classes.*;
    import com.greensock.*;

    public class ShortGlowEffect extends MapResourceEffect {

        private var m_isActive:Boolean;
        private var m_glowColor:uint;
        private var m_duration:uint;
        private var m_size:Number;
        private var m_glowTimeline:TimelineLite;

        public function ShortGlowEffect(_arg1:MapResource, _arg2:uint=0, _arg3:uint=0xFFAA00, _arg4:Number=2.5){
            var _local5:DisplayObject;
            super(_arg1);
            this.m_isActive = true;
            this.m_glowColor = _arg3;
            this.m_duration = _arg2;
            this.m_size = ((_arg4 < 0)) ? 0 : _arg4;
            if (m_mapResource.getDisplayObject()){
                _local5 = m_mapResource.getDisplayObject();
                this.m_glowTimeline = new TimelineLite({onComplete:this.cleanUp});
                this.m_glowTimeline.appendMultiple([new TweenLite(_local5, 0.2, {glowFilter:{
                        color:this.m_glowColor,
                        strength:100,
                        alpha:1,
                        blurX:this.m_size,
                        blurY:this.m_size
                    }}), new TweenLite(_local5, 0.2, {glowFilter:{
                        color:this.m_glowColor,
                        strength:100,
                        alpha:0,
                        blurX:this.m_size,
                        blurY:this.m_size
                    }})], 0, TweenAlign.SEQUENCE, this.m_duration);
            };
        }
        override public function animate(_arg1:uint):Boolean{
            return (this.m_isActive);
        }
        override public function cleanUp():void{
            this.m_isActive = false;
        }

    }
}//package Classes.effects 
